/*
 * =====================================================================================
 *
 *       Filename:  anniverCake.cc
 *
 *    Description:  square cover
 *
 *        Version:  1.0
 *
 *        Created:  09/18/2012 08:19:33 PM
 *
 * =====================================================================================
 */
#include	<stdio.h>
#include	<string.h>

int sizeCnt[11];
int columnFill[42];
int cakeCount;
int origSize;
bool nowaste;

int dfs(int nCake)
{
    if (nCake == cakeCount) {
        nowaste = true;
        return 1;
    }
    //get the pos which has the minimal filled space
    int minFillPos = 0, i = 1, minFill = 41;
    for (; i <= origSize; ++i)
        if (columnFill[i] < minFill) {
            minFillPos = i;
            minFill = columnFill[i];
        }
    //get the minimal length value of square
//    int minLen;
//    for (minLen = 1; minLen < 11; ++minLen)
//        if (sizeCnt[minLen] > 0)
//            break;
    // get the maxspan
    int maxspan = 0;
    for (int j = minFillPos; j <= origSize && columnFill[j] == minFill; ++j)
        ++maxspan;
    //iterate all the available square
    int res = 0;
    for (int i = 10; i >= 1; --i)
    {
        if (sizeCnt[i] > 0 && i <= maxspan && minFill + i <= origSize) {
            for (int j = 0; j < i; ++j)
                columnFill[minFillPos+j] += i;
            --sizeCnt[i];
            res = dfs(nCake+1);
            if (res != 1) {
                ++sizeCnt[i];
                for (int j = 0; j < i; ++j)
                    columnFill[minFillPos+j] -= i;
            } else
                break;
        }
    }
    return res;
}

int main(int argc, char *argv[])
{
    int T, temp, sumArea;
    while (scanf("%d", &T) == 1) {
        while (T--) {
            sumArea = 0;
            memset(sizeCnt, 0x00, sizeof(sizeCnt));
            scanf("%d%d", &origSize, &cakeCount);
            for (int i = 0; i < cakeCount; ++i) {
                scanf("%d", &temp);
                sizeCnt[temp]++;
                sumArea += temp * temp;
            }
            if (origSize * origSize != sumArea) {
                printf ( "HUTUTU!\n" );
                continue;
            }
            memset(columnFill, 0x00, sizeof(columnFill));
            nowaste = false;
            int res = dfs(0);
            if (res == 1)
                printf ( "KHOOOOB!\n" );
            else
                printf ( "HUTUTU!\n" );
        }
    }
    return 0;
}
